﻿using System;
using HAVNet.Core;


namespace HAVNet.Intros.AST
{
    public class ASTExprPrimType : ASTExprPrim 
    {
        ASTTypeArgumentList _typeArgumentList = null;

        public string               sPrimitiveType      { get; set; }
        public string               ident               { get; set; }
        public ASTTypeArgumentList  typeArgumentList    { get { if (_typeArgumentList == null) _typeArgumentList = new ASTTypeArgumentList(); return _typeArgumentList; } }

        public override string ToString ()
        {
            string sPosible = "";

            if (ident != null)
            {
                sPosible += "." + ident;

                if (_typeArgumentList != null)
                    sPosible += typeArgumentList;
            }

            return sPrimitiveType + sPosible + Lazy.toStringNN(_tails, "");
        }
    }
}
